﻿using Microsoft.Xna.Framework;

namespace Syngine.Input.Mouse
{
	/// <summary>
	/// 
	/// </summary>
	public struct MarqueeState
	{
		private readonly bool _isDragging;
		private readonly Rectangle _bounds;

		/// <summary>
		/// 
		/// </summary>
		/// <param name="bounds"></param>
		public MarqueeState(Rectangle bounds, bool isDragging)
		{
			_bounds = bounds;
			_isDragging = isDragging;
		}

		public bool IsDragging
		{
			get
			{
				return _isDragging;
			}
		}

		public Rectangle Bounds
		{
			get
			{
				return _bounds;
			}
		}

		public bool Contains(Rectangle bounds)
		{
			return Bounds.Contains(bounds);
		}

		public bool Contains(Vector2 vector)
		{
			return Contains(vector.X, vector.Y);
		}

		public bool Contains(Point point)
		{
			return Contains(point.X, point.Y);
		}

		public bool Contains(float x, float y)
		{
			return Contains((int)x, (int)y);
		}

		public bool Contains(int x, int y)
		{
			return (Bounds.Contains(x, y));
		}
	}
}